home *** CD-ROM | disk | FTP | other *** search
- /*
- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
- ▒ ▒
- ▒ ▒
- ▒ Neuromancer's Graphics Library ▒
- ▒ Version 1.0c ▒
- ▒ ▒
- ▒ This routine demonstrate circle and filled circle in ▒
- ▒ a clipped region ▒
- ▒ ▒
- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
- ▒ ▒
- ▒ Project: MTLIB01.LIB ▒
- ▒ DEMO4.CPP ▒
- ▒ ▒
- ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
- */
-
- #include <iostream.h>
- #include <stdlib.h>
- #include <conio.h>
- #include "video.h"
- #include "circle.h"
-
- void main(void)
- {
- int x,y,radius,color;
-
- mtSetVGAMode(); //Set up VGA Mode
-
- while(!kbhit())
- {
- x = random(320);
- y = random(200);
- radius = random(50);
- color = random(256);
-
- if ((radius < x ) || (radius < y))
- {
- mtCCircle(x,y,radius,color);
- }
- }
-
- getch();
-
- mtClrScr(0);
-
- mtSetWindow(15,15,304,184); //set up clip region
- mtClrScr(15); //clear region to color 15
-
- while(!kbhit())
- {
- x = random(320)+1;
- y = random(200)+1;
- radius = random(40);
- color = random(256);
-
- if ((radius < x ) || (radius < y))
- {
- mtCFillCircle(x,y,radius,color);
- }
- }
-
- getch();
-
- mtSetTextMode();
-
- cout << "Thank you for using the library!" << endl;
-
- exit(0);
-
- }
-
-
-
-
-
-
-
-